/*
* @Author: XUHAO325
* @Date:   2017-04-07 15:29:36
* @Last Modified by:   XUHAO325
* @Last Modified time: 2017-04-07 17:44:49
*/

$(function(){ 
    		
    		teleNumFixed.teleShow(2);
    		
    	})
    		var teleNumFixed = {
    			param: {
    				1:"对投保流程有疑问？<br>可致电远程专家团队",
    				2:"对支付方式有疑问？<br>可致电远程专家团队",
    				3:"对保单签收有疑问？<br>可致电远程专家团队"
    			},
    			teleShow: function (num) {
    				var that = this;
    				if($(".teleTips").length > 0) return false;
    				$('<a href="tel:4006095511" class="teleTips">\
    						<i class="teleIcon"></i>\
    						<span class="teleTxt"></span>\
    				</a>').appendTo('body');
    				$(".teleTxt").html(this.param[num]);
    				$(".teleTips").css("visibility","visible");
    				$(".teleTips").on("touchstart",function(e){
    					
    					$(".teleTips").css("right",0);
    					that.setFiveSecond();
    					var ua = navigator.userAgent.toLowerCase();	
    					if(!/iphone|ipad|ipod/.test(ua)){
    						e.preventDefault();
    						e.stopPropagation();
    						setTimeout(function(){
		    					var bol = confirm("是否拨打远程专家热线 4006095511?");
		    					if(bol){
		    						$(".teleTips .teleTxt").trigger("click");	
		    					}
		    				}, 500);
    					}
    					
    				});	
    				that.setFiveSecond();
    				
    			},
    			setFiveSecond:function(){
    				setTimeout(function(){
    					$(".teleTips").css({"right":"-5.88rem"});
    				}, 5000);
    			}
    		}